#include "key.H"


//Column/Row to key matrix
//Copied from [3]

//Regular keys:

//COL1	COL2	COL3	COL4	COL5
//ROW1	Q	E	R	U	O
//ROW2	W	S	G	H	L
//ROW3	sym	D	T	Y	I
//ROW4	A	P	R ⇧	↵	⌫
//ROW5	alt	X	V	B	$
//ROW6	spac	Z	C	N	M
//ROW7	🎤	L ⇧	F	J	K
//Alternative keys:

//COL1	COL2	COL3	COL4	COL5
//ROW1	#	2	3	_	+
//ROW2	1	4	/	:	"
//ROW3		5	(	)	-
//ROW4	*	@			
//ROW5		8	?	!	🔊
//ROW6		7	9	,	.
//ROW7	0		6	;	'

uint32_t Keyboard_Map_Value[ROW_NUM][COL_NUM] =
{
	{0x10000000,0x20000000,0x01000000,0x02000000,0x04000000}, //group4 
	{0x00100000,0x00200000,0x00010000,0x00020000,0x00040000}, //group4
	{0x00100000,0x00200000,0x00010000,0x00020000,0x00040000}, //group1
	{0x10000000,0x20000000,0x01000000,0x02000000,0x04000000}, //group3
	{0x00100000,0x00200000,0x00010000,0x00020000,0x00040000}, //group3	
	{0x00001000,0x00002000,0x00000100,0x00000200,0x00000400}, //group3	
	{0x00000010,0x00000020,0x00000001,0x00000002,0x00000004}, //group3		
};






const char *Keyboard_Map1_Name[ROW_NUM][COL_NUM] =
{
    {"Q", "E", "R", "U", "O"},
    {"W", "S", "G", "H", "L"},
    {"sym","D","T",	"Y"	,"I"},
    {"A",  "P","r_up", "enter" ,"backspace"},
    {"alt","X","V"	,"B","$"},
		{"spac","Z","C"	,"N",	"M"},
		{"voice","l_up","F","J","K"},

};


const char *Keyboard_Map2_Name[ROW_NUM][COL_NUM] =
{
    {"#", "2", "3", "_", "+"},
    {"1", "4", "/", ":", "\""},
    {" ","5","(",	")"	,"-"},
    {"*",  "@"," ", " " ," "},
    {" ","8","?"	,"!","sound"},
		{" ","7","9"	,",",	"."},
		{"0"," ","6",";","'"},

};
/*  ��ֵ��  */
const uint8_t Keyboard_Map_Temp[ROW_NUM][COL_NUM] =
{0
//    {/*ESC*/ 0x29, /* 1 */ 0x1E, /* 2 */ 0x1f, /* 3 */ 0x20, /* 4 */ 0x21, /* 5 */ 0x22, /* 6 */ 0x23, /* 7 */ 0x24, /* 8 */ 0x25, /* 9 */ 0x26, /*0 0*/ 0x27, /* - */ 0x2D, /* + */ 0x2E, /*BCK*/ 0x2A, /*Ins*/ 0X49},
//    {/*TAB*/ 0x2B, /* Q */ 0x14, /* W */ 0x1A, /* E */ 0x08, /* R */ 0x15, /* T */ 0x17, /* Y */ 0x1C, /* U */ 0x18, /* I */ 0x0C, /* O */ 0x12, /* P */ 0x13, /* [ */ 0x2F, /* ] */ 0x30, /* \ */ 0x31, /*DEL*/ 0X4C},
//    {/*CAP*/ 0x39, /* A */ 0x04, /* S */ 0x16, /* D */ 0x07, /* F */ 0x09, /* G */ 0x0A, /* H */ 0x0B, /* J */ 0x0D, /* K */ 0x0E, /* L */ 0x0F, /* ; */ 0x33, /* ' */ 0x34, /*NOP*/ 0x00, /*ENT*/ 0x58, /*PgUp*/ 0X4B},
//    {/*SHF*/ 0XE1, /* Z */ 0X1D, /* X */ 0X1B, /* C */ 0X06, /* V */ 0X19, /* B */ 0X05, /* N */ 0X11, /* M */ 0X10, /* , */ 0X36, /* . */ 0X37, /* / */ 0X38, /*SHF*/ 0XE5, /*NOP*/ 0x00, /* UP*/ 0x52, /*PgDown*/ 0X4E},
//    {/*CTR*/ 0xE0, /*WIN*/ 0xE3, /*ALT*/ 0XE2, /*NOP*/ 0x00, /*NOP*/ 0x00, /*SPC*/ 0X2C, /*NOP*/ 0x00, /*NOP*/ 0x00, /*NOP*/ 0x00, /*RGB*/ 0XFF, /* FN*/ 0xF2, /*CTR*/ 0xE4,  /*LFT*/ 0X50, /*DOW*/ 0X51, /*RIG*/ 0X4F}
};


void key_init()
{

}